package com.fuxian.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Repository;

import com.fuxian.dao.ProspectivestudentDao;
import com.fuxian.model.Prospectivestudent;
import com.fuxian.service.ProspectivestudentService;
import com.fuxian.util.DateUtile;
@Repository
public class ProspectivestudentServiceImpl implements ProspectivestudentService {
	@Resource
	private ProspectivestudentDao prospectivestudentdao;
	public void addProspectivestudent(Prospectivestudent prospectivestudent) {
		prospectivestudent.setCreate_time(DateUtile.getTimestamp());
		prospectivestudent.setStatus(0);
		prospectivestudentdao.addProspectivestudent(prospectivestudent);

	}

	public void deleteProspectivestudentById(int id) {
		prospectivestudentdao.deleteProspectivestudentById(id);
	}

	public void modifyProspectivestudent(Prospectivestudent prospectivestudent) {
		prospectivestudentdao.modifyProspectivestudent(prospectivestudent);

	}

	public List<Prospectivestudent> selectAllProspectivestudent(Map map) {
		List<Prospectivestudent>list=prospectivestudentdao.selectAllProspectivestudent(map);
		return list;
	}

	public List<Prospectivestudent> selectProspectivestudentByConsumeId(Map map) {
		List<Prospectivestudent>list=prospectivestudentdao.selectProspectivestudentByConsumeId(map);
		return list;
	}

	public Prospectivestudent selectProspectivestudentById(int id) {
		Prospectivestudent prospectivestudent=prospectivestudentdao.selectProspectivestudentById(id);
		return prospectivestudent;
	}

	public List<Prospectivestudent> selectProspectivestudentByLessonId(Map map) {
		List<Prospectivestudent>list=prospectivestudentdao.selectProspectivestudentByLessonId(map);
		return list;
	}

	public List<Prospectivestudent> selectProspectivestudentBySchoole(Map map) {
		List<Prospectivestudent>list=prospectivestudentdao.selectProspectivestudentBySchoole(map);
		return list;
	}

	public int selectProspectivestudentByStatusConut(int status) {
		int n= prospectivestudentdao.selectProspectivestudentByStatusConut(status);
		return n;
	}

}
